package com.yuyue.dronesystem.beans;

import java.util.Objects;

/**
 * RequirementItem
 */
public class RequirementItem {

    // 急救包ID
    private Long aidKitId;
    // 数量
    private Long quantity;
    // 频率
    private String frequency;

    public RequirementItem() {
    }

    public RequirementItem(Long aidKitId, Long quantity, String frequency) {
        this.aidKitId = aidKitId;
        this.quantity = quantity;
        this.frequency = frequency;
    }

    public Long getAidKitId() {
        return this.aidKitId;
    }

    public void setAidKitId(Long aidKitId) {
        this.aidKitId = aidKitId;
    }

    public Long getQuantity() {
        return this.quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public String getFrequency() {
        return this.frequency;
    }

    public void setFrequency(String frequency) {
        this.frequency = frequency;
    }

    public RequirementItem aidKitId(Long aidKitId) {
        this.aidKitId = aidKitId;
        return this;
    }

    public RequirementItem quantity(Long quantity) {
        this.quantity = quantity;
        return this;
    }

    public RequirementItem frequency(String frequency) {
        this.frequency = frequency;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof RequirementItem)) {
            return false;
        }
        RequirementItem requirementItem = (RequirementItem) o;
        return Objects.equals(aidKitId, requirementItem.aidKitId) && Objects.equals(quantity, requirementItem.quantity) && Objects.equals(frequency, requirementItem.frequency);
    }

    @Override
    public int hashCode() {
        return Objects.hash(aidKitId, quantity, frequency);
    }

    @Override
    public String toString() {
        return "{" +
            " aidKitId='" + getAidKitId() + "'" +
            ", quantity='" + getQuantity() + "'" +
            ", frequency='" + getFrequency() + "'" +
            "}";
    }
}